package test06;

import java.util.Scanner;

public class Dicidenewvirus {

    public static Scanner sc = new Scanner(System.in);

    static int symptom() {

        System.out.println("判断症状:有症状选输入1 ，无症状选输入0");
        int result;
        result = sc.nextInt();
        if (result == 1) {
            System.out.println("发热、咽喉痛、咳嗽、鼻塞、流鼻涕、胸闷、气急、呼吸困难、全身酸痛、乏力、腹泻、");
        } else {

            return 0;
        }
        return 1;
    }

    static int time() {

        System.out.println("本次不舒服有多久了？	14天以内输入1 ，14天以上输入2");
        int resulttime;
        resulttime = sc.nextInt();
        if (resulttime == 1) {

            return 1;
        }

        return 2;
    }

    static int contacthistory() {
        //Scanner sc = new Scanner(System.in);
        System.out.println(
                "有无接触史 ：有武汉（湖北）等疫区旅游史或居住史/有接触过来自武汉（湖北）等疫区人员" +
                        "/有接触过疑似或确诊新型冠状病毒感染者/身边有多人出现发热、乏力、咳嗽、咽痛等   输入1 ， 无接触史输入 0");
        int result;
        result = sc.nextInt();
        if (result == 1) {

            return 1;
        } else {

            return 0;
        }
    }

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int symptom1; // 症状
        int time1; // 生病时长
        int contacthistory1; // 接触史

        symptom1 = symptom();
        if (symptom1 == 1) {
            time1 = time();
        } else {

        }
        contacthistory1 = contacthistory();

        sc.close();
        if (symptom1 == 1 && contacthistory1 == 1) {
            System.out.println(1);
        }
        if (symptom1 == 1 && contacthistory1 == 0) {
            System.out.println(2);
        }
        if (symptom1 == 0 && contacthistory1 == 1) {
            System.out.println(3);
        }
        if (symptom1 == 0 && contacthistory1 == 0) {
            System.out.println(4);
        }
    }

}
